<!DOCTYPE html>
<html lang="zh-cn">
	<head>
		<!--
	base标签必须放在head标签中，定义了该标签的当前页，所有相对路径都是基于该base指定的路径
	href="/bootstrap/bootstrap.min.css
	路径处理：     /hawaste/+static/bootstrap/bootstrap.min.css
	-->

		<meta charset="utf-8" />
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<title>危废智能监管平台</title>
		<meta name="description" content="index" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />

		<!-- bootstrap & fontawesome -->
		<link rel="stylesheet" href="/bootstrap/bootstrap.min.css" />
		<link rel="stylesheet" href="/css/font-awesome.min.css" />
		<link rel="stylesheet" href="/chosen/chosen.min.css" />

		<!-- ace styles -->
		<link rel="stylesheet" href="/ace/css/ace.min.css" id="main-ace-style" />

		<link rel="stylesheet" href="/ace/css/ace-skins.min.css" />
		<link rel="stylesheet" href="/ace/css/ace-rtl.min.css" />

		<link rel="stylesheet" href="/ztree/metro.css" />
		<link rel="stylesheet" href="/validate/css/validform.css" />
		<link rel="stylesheet" href="/css/custom.css" />


		<script src="/jquery/jquery.js"></script>

		<!-- ace settings handler -->
		<script src="/ace/js/ace-extra.min.js"></script>
	</head>

	<body class="login-layout blur-login">
		<div class="main-container">
			<div class="main-content">
				<div class="row">
					<div class="col-sm-10 col-sm-offset-1">
						<div class="login-container" style="padding-top: 60px;">
							<div class="center">
								<h1>
									<span class="red" id="id-text2">危废智能监管平台</span>
								</h1>
								<h4 class="blue" id="id-company-text">&copy; 粤嵌</h4>
							</div>

							<div class="space-6"></div>

							<div class="position-relative">
								<div id="login-box" class="login-box visible widget-box no-border">
									<div class="widget-body">
										<div class="widget-main">
											<h4 class="header blue lighter bigger" id="msg">
												<i class="ace-icon fa fa-coffee green"></i>
												hawaste-危废处置好帮手
											</h4>

											<div class="space-6"></div>

											<form id="login-form" action="" method="post">
												<fieldset>
													<label class="block clearfix">
														<span class="block input-icon input-icon-right">
															<input type="text" class="form-control" v-model="params.username" name="username" placeholder="用户名" autocomplete="off"/>
															<i class="ace-icon fa fa-user"></i>
														</span>
													</label>

													<label class="block clearfix">
														<span class="block input-icon input-icon-right">
															<input type="password" class="form-control" v-model="params.password" name="password" placeholder="密码" autocomplete="off"/>
															<i class="ace-icon fa fa-lock"></i>
														</span>
													</label>
													
													<label class="block clearfix">
													<!--	<span class="block input-icon input-icon-right">
															<input type="text" class="form-control width-55 pull-left" name="code" placeholder="验证码" autocomplete="off"/>
															<img src="captcha?width=120&height=32" onclick="javascript:refresh(this);" id="code"
															class="pull-right" title="点击换一张" style="cursor: pointer;border: 1px solid rgb(181, 181, 181);"/>
														</span>-->
													</label>

													<div class="space"></div>

													<div class="clearfix">
														<span type="button" class="width-100 pull-right btn btn-primary" id="login-btn" @click="doLogin">
															<i class="ace-icon fa fa-key"></i>
															<span class="bigger-115">登&nbsp;录</span>
														</span>
													</div>

													<div class="space-4"></div>
												</fieldset>
											</form>
										</div><!-- /.widget-main -->

										<div class="toolbar clearfix">
											<div style="width: 100%;text-align: center;">
												<a href="javascript:void(0);" class="forgot-password-link bigger-130" style="text-decoration: none;">
													<i class="ace-icon fa fa-arrow-left"></i>
													请关注微信公众号"hawaste"进行注册!
													<i class="ace-icon fa fa-arrow-right"></i>
												</a>
											</div>
										</div>
									</div><!-- /.widget-body -->
								</div><!-- /.login-box -->
							</div><!-- /.position-relative -->

						</div>
					</div><!-- /.col -->
				</div><!-- /.row -->
			</div><!-- /.main-content -->
		</div><!-- /.main-container -->

		<!-- basic scripts -->

		<!--[if !IE]> -->
		<script src="/jquery/jquery.js"></script>
		<!-- <![endif]-->

		<script type="text/javascript" src="/layer/layer.js"></script>
		<script type="text/javascript" src="/validate/Validform_v5.3.2_min.js"></script>
		<script src="/vue/vue.js"></script>
		<script src="/vue/axios.js"></script>
		<script>
			new Vue({
				el:'#login-box',
				data:{
					params:{

					},
				},
				methods:{
					doLogin:function () {
					axios({
						url:'/doLogin',
						params: this.params
					}).then(r=>{
						if (r.data.code!=200){
						//	失败
							layer.msg(r.data.msg);
							this.params = {};//清空
						}else {
						//	成功登录  1.保存用户状态 2.跳转到用户界面
							location.href='index.html';

						}
					})
					}
				}
			})
		</script>
	</body>
</html>
